package com.ruoyi.controller.jpjs.personconfig;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.service.jpjs.PublicService;
import com.ruoyi.service.jpjs.personconfig.PerSonConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author zeo
 * 人员配置表
 */
@Controller
@RequestMapping("/perSonConfig")
public class PerSonConfigController extends BaseController {

    private String prefix = "jpjs/personconfig";

    @Autowired
    PublicService publicService;

    @Autowired
    PerSonConfigService perSonConfigService;

    @GetMapping()
    public String perSonConfig(ModelMap mmap) {
        mmap.put("userComp", publicService.findUserCompAndJszb());
        return prefix + "/perSonConfig";
    }

    @RequestMapping("/list")
    @ResponseBody
    public TableDataInfo list(@RequestParam Map map) {
        List<Map<String,Object>> list = perSonConfigService.list(map);
        return getDataTable(list);
    }

}

